package com.kuaiyin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Map;

@Data
@TableName("test_plan_case")
@Schema(name = "TestPlanCase", description = "测试计划用例关联实体")
public class TestPlanCase {
    @TableId(type = IdType.AUTO)
    @Schema(description = "关联ID")
    private Long id;

    @Schema(description = "计划ID")
    private Long planId;

    @Schema(description = "用例ID")
    private Long caseId;

    @Schema(description = "执行顺序（0表示无顺序）")
    private Integer executionOrder;

    @Schema(description = "是否启用（0-禁用，1-启用）")
    private Integer status;

    @Schema(description = "扩展配置（如用例特定参数）")
    private String extendedConfig;

    @Schema(description = "响应提取配置",
            example = "{\"caseId\":\"id\":1} ")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private Map<String, Object> responseExtract;

    @Schema(description = "JMeter响应提取配置（JSON格式，示例：{\"token\":\"$.data.token\"}）")
    @TableField(value = "jmx_response_extract", typeHandler = FastjsonTypeHandler.class)
    private Map<String, Object> jmxResponseExtract;




}